module.service('System', ['$rootScope', function ($rootScope) {
    var service = {
        _baseUrl: "/azeroth/back/operateflow/",
        operateFlowList: [],
        totalCount: 0,
        totalSceneCount: 0,
        getOperateFlowList: function (operateFlow, callback) {


            $rootScope.ajaxRequestPost(service._baseUrl + "list.htm", operateFlow, function (resultJson) {

                angular.copy(resultJson.data, service.operateFlowList);
                service.totalCount = resultJson.totalCount;
                if (callback) {
                    callback();
                }
            });
        },
        removeImageList: function (selectedItemList, callback) {

            var paramData = {
                fileList: selectedItemList.join(",")
            };
            $rootScope.ajaxRequestPost(service._baseUrl + "deleteFile.htm", paramData, function (resultJson) {

                if (callback) {
                    callback();
                }
            });
        }

    };
    return service;
}]);
